package kit.edu.lego.gruppe3.levels.rotateBridge;

import kit.edu.lego.gruppe3.ComponentsRepository;
import kit.edu.lego.gruppe3.levels.LevelSelector;
import kit.edu.lego.gruppe3.levels.LevelSolver;
import kit.edu.lego.gruppe3.levels.LevelSelector.Level;
import kit.edu.lego.gruppe3.levels.line.LineFinder;
import kit.edu.lego.gruppe3.levels.line.LineFollower;
import kit.edu.lego.gruppe3.levels.line.LineSolver;
import lejos.robotics.subsumption.Arbitrator;
import lejos.robotics.subsumption.Behavior;

public class RotateBridgeSolver implements LevelSolver{

	public static volatile boolean objectFound = false;
	
	@Override
	public void start() {
		LevelSelector.getInstance().setCurrentLevel(Level.rotatitngBrigde);
//		Behavior moveOnDisc = new MoveOnDisc();
//		LevelSolver lineSolver = new LineSolver();
//		lineSolver.start();
//		
//		Behavior[] behaviors = {moveOnDisc};
//		
//		Arbitrator arby = new Arbitrator(behaviors);
//		
//		arby.start();
		
		DiscSolver lik = new DiscSolver();
		lik.start();
		
//		
//		ComponentsRepository.getInstance().getRobotPilot().setTravelSpeed(20);
//		ComponentsRepository.getInstance().getRobotPilot().travel(30);
//		ComponentsRepository.getInstance().getRobotPilot().travelArc(85, 15f);
//		ComponentsRepository.getInstance().getRobotPilot().setTravelSpeed(20);
//		ComponentsRepository.getInstance().getRobotPilot().travel(30);
//		ComponentsRepository.getInstance().getRobotPilot().travel(20);
	
	}

	@Override
	public String toString() {
		return "Rotating bridge solver";
	}


	private static boolean levelCleared = false;
	
	public static boolean isLevelCleared() {
		return levelCleared;
	}
	
	public static void setLevelCleared(boolean cleared){
		levelCleared = cleared;
	}
}
